home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 41 / Amiga Format CD41 (1999-06)(Future Publishing)(GB)[!][issue 1999-07].iso / -seriously_amiga- / misc / amised / viewers / sources / viewer.h < prev    next >
C/C++ Source or Header  |  1999-04-19  |  20KB  |  801 lines

  1. /*
  2.     AMIS Include for Viewers. (V1.04)
  3.  
  4.     In this file you almost everything you need to create you own viewer.
  5.     This file is still under development, see later versions for a more
  6.     complete documentation.
  7. */
  8.  
  9. struct LineInfo
  10. {
  11.     short    li_length;                /* Don't change this !! */
  12.     short    li_height;                /* For more information see the Viewer
  13.                                             structure. */
  14.     long    li_viewerdata;            /* This is for you... */
  15.     long    li_viewerdata2;        /* and so is this... */
  16. };
  17.  
  18. struct EditWin
  19. {
  20.     long    wn_next;
  21.     long    wn_prev;
  22.     char    wn_type;
  23.     char    wn_pri;
  24.     long    wn_name;
  25.     struct Window    *wn_base;
  26.     struct RastPort    *wn_rast;
  27.     long    wn_gadget;
  28.     short    wn_innerwidth;
  29.     short    wn_innerheight;
  30.     short    wn_left;
  31.     short    wn_top;
  32.  
  33.     long    *ed_memlist;
  34.     long    *ed_project;
  35.     struct Font    *ed_font;
  36.     struct Viewer    *ed_display;
  37.     long    ed_bookmarks[10];
  38.     long    ed_viewerdata;                    /* This is for you  */
  39.     long    ed_moreviewerdata[16];        /* and so is this   */
  40.     long    ed_viewervar[10];                /* and some more    */
  41.     long    ed_viewerobj;                    /* and this one too */
  42.     char    ed_flags;
  43.     char    ed_flags2;
  44.     char    ed_flags3;
  45.     char    ed_flags4;
  46.     char    ed_flags5;
  47.     char    ed_flags6;
  48.     char    ed_protectflags;
  49.     char    ed_moreflags;
  50.     long    ed_clip;
  51.     short    ed_tabsize;
  52.     long    ed_winchars;
  53.     long    ed_winlines;
  54.     short    ed_top_offset;
  55.     short    ed_pl_y_offset;
  56.     short    ed_pl_own_height;
  57.     long    ed_pl_total_y;
  58.     short    ed_topborder;
  59.     short    ed_leftborder;
  60.     short    ed_first_y;
  61.     short    ed_last_y;
  62.     long    ed_visible_y;
  63.     long    ed_topline;
  64.     long    ed_topline_tick;
  65.     long    ed_leftchar;
  66.     long    ed_lines;
  67.     long    ed_chars;
  68.     long    ed_line;
  69.     long    ed_oldtopline;
  70.     long    ed_oldtoppos;
  71.     struct LineInfo    *ed_linesinfo;
  72.     char    *ed_buffer;                            /* the text of this file */
  73.     long    ed_bufsize;
  74.     long    ed_bufpos;
  75.     char    *ed_linebuf;                        /* this lines text */
  76.     char    *ed_linebuf_backup;
  77.     long    ed_linebuflast;
  78.     long    ed_oldlinelength;
  79.     long    ed_char;
  80.     long    ed_winpos;
  81.     long    ed_cursoffset;
  82.     short    ed_curs_px1;
  83.     short    ed_curs_py1;
  84.     short    ed_curs_px2;
  85.     short    ed_curs_py2;
  86.     short    ed_buttonwidth;
  87.     void    *ed_buttonlist;
  88.     long    ed_slidertopline;
  89.     long    ed_sliderlines;
  90.     short    ed_slidersize;
  91.     long    ed_startpos;
  92.     long    ed_endpos;
  93.     long    ed_last_startpos;
  94.     long    ed_last_endpos;
  95.     long    ed_oldline;
  96.     long    ed_oldchar;
  97.     long    ed_mouseline;
  98.     long    ed_mousechar;
  99.     long    ed_mousepos;
  100.     long    ed_blocktemp1;
  101.     long    ed_blocktemp2;
  102.     long    ed_blocktemp3;
  103.     long    ed_blocktemp4;
  104.     long    ed_subpos;
  105.     short    ed_viewerbar_y;
  106.     long    ed_removefunc;
  107.     short    ed_statusbar_y;
  108.     short    ed_codebar_y;
  109.     short    ed_freebar;
  110.     long    ed_title_msg;
  111.     short    ed_tm_time;
  112.     long    ed_timerioreq;
  113.     short    ed_lineheight;
  114.  
  115.     char    ed_path[144];
  116.     char    ed_filename[144];
  117.     char    ed_name[144];
  118.     char    ed_screenname[100];
  119.     char    ed_comment[80];
  120.  
  121. /* PRIVATE !! */
  122.  
  123.     long    ed_tmprastport;
  124.     long    ed_tmplayer;
  125.     long    ed_tmpbitmap;
  126.     long    ed_layerinfo;
  127.  
  128.     struct List    ed_linelist;
  129. };
  130.  
  131. struct Viewer
  132. {
  133.     struct Node        vw_node;                /* Fill in the name and set ln_type to
  134.                                                     the version of AMIS this viewer was
  135.                                                     made for. (See Versions below). */
  136.     long    vw_loadseg;                        /* Set to zero! */
  137.  
  138. /*
  139.     With the next three options you can tell AMIS for which files this viewer
  140.     should be used. Note that the file must have all three before it will be
  141.     recognized. You can set starttext and typicaltext to zero if neccessery.
  142. */
  143.  
  144.     char    *vw_filepattern;                /* filepattern, e.g. "#?" */
  145.     char    *vw_starttext;                    /* first text in file, e.g. "@database"*/
  146.     char    *vw_typicaltext;                /* some text somewhere in every file of
  147.                                                     your type, e.g. "@node" */
  148.  
  149.     void    (*vw_switchfunction)();        /* function to be called after every
  150.                                                     switch to this viewer */
  151.  
  152.     char    vw_flags1;                        /* flags for you, see below */
  153.     char    vw_flags2;                        /* AMIS private flags ! */
  154.  
  155.     long    (*vw_display)();                /* the display function it self */
  156.     void    (*vw_newpos)();                /* function to be called every time the
  157.                                                     cursor is moved */
  158.     void    (*vw_getwinpos)();            /* set ed_winpos with ed_char given */
  159.     void    (*vw_getchar)();                /* set ed_char with ed_winpos given */
  160.     void    (*vw_codebar)();                /* return text to be displayed in
  161.                                                     codebar */
  162.  
  163. /*
  164.     With the following three options you can change the height of the text
  165.     lines. First textheights is multiplied by the height of the selected font
  166.     and then topspacing and bottomspacing are added. The result is the height
  167.     of a line on the screen (in pixels).
  168.  
  169.     If you wish to give different lines different heights you can add an
  170.     offset in the second word of the linesinfo structure of every line. In
  171.     must cases you will then set the following three options to zero and set
  172.     the whole line height in the linesinfo structure.
  173. */
  174.     short    vw_textheights;
  175.     short    vw_topspacing;
  176.     short    vw_bottomspacing;
  177.  
  178.     char    vw_bg_color;                    /* color to use for unused window
  179.                                                     space */
  180.     char    vw_planes;                        /* number of bitplanes to be
  181.                                                     cleared/scrolled */
  182. /*
  183.     The next variable is used to reserve some space in the window for the
  184.     viewerbar. The two functions behind it are called every time the
  185.     viewerbar should be drawn and removed (free memory etc., you don't have
  186.     to remove the actual graphics).
  187. */
  188.     short    vw_barheight;
  189.     void    (*vw_viewerbar)();
  190.     void    (*vw_remove_vb)();
  191.  
  192. /*
  193.     The next two functions can be used to replace the normal cursright and
  194.     cursleft functions. You can use this the jump the cursor over text
  195.     commands or other places the cursor shouldn't be. Beware that when the
  196.     cursor is in the codebar the normal functions will always be used!
  197. */
  198.     void    (*vw_cursright)();
  199.     void    (*vw_cursleft)();
  200.  
  201. /*
  202.     In vw_font you MUST pass an opened font you wish to you use for
  203.     displaying your text. If you wish to use the default font simply copy the
  204.     font passed to you in the AMIS structure.
  205. */
  206.     struct Font *vw_font;
  207.  
  208. /*
  209.     The next function is used for breaking lines. When this function is
  210.     called you should return the VISIBLE part of the line that is passed to
  211.     you. This means you should filter out everything that will not appear on
  212.     the screen. AMIS will check this line for spaces to break a line. If
  213.     there are spaces on the screen where the line should be broken you sould
  214.     set an '_' in the line you give back instead of a ' '. This way you have
  215.     complete control over where lines may and may not be broken.
  216. */
  217.     void    (*vw_plaintext)();
  218.  
  219. /*
  220.     The next option will be used to make it possible to define different
  221.     functions for keys in different viewers. This isn't completely working
  222.     yet and for now it is best to point to an empty list (you may also pass a
  223.     zero if you wish).
  224. */
  225.     struct List    *vw_keyslist;
  226.  
  227. /*
  228.     The next two functions are called every time a file is loaded / saved or
  229.     the user switches to this viewer or an other viewer. You may use these
  230.     functions to filter out text that should not be displayed or something
  231.     like that. Please not that the savefilter should set back all this
  232.     information, otherwise some text might 'get lost' without the user
  233.     knowing about it (not very user friendly, don't you think ?).
  234. */
  235.     int    (*vw_loadfilter)();
  236.     int    (*vw_savefilter)();
  237.  
  238. /*
  239.     The next function is the unload function wish will be called when AMIS is
  240.     quiting. This function allows you to free recources, close fonts, free
  241.     images, etc.
  242. */
  243.     void    (*vw_unload)();
  244.  
  245. /*
  246.     The next option is a pointer to the text you want to be displayed in the
  247.     viewer info requester. Lines can be seperated with a '|' sign.
  248. */
  249.     char    *vw_infotext;
  250.  
  251. /*
  252.     The next function should set all your variables to there initial state.
  253.     (As if a new window was opened without any text in it.)
  254. */
  255.     void    (*vw_clear)();
  256.  
  257. /*
  258.     The next function will be called after the AMIS screen is opened (bootup
  259.     and UnIconify).
  260. */
  261.     void    (*vw_openscreen)();
  262.  
  263. /*
  264.     The next function will be called when the AMIS screen is close (quiting
  265.     and Iconify).
  266. */
  267.     void    (*vw_closescreen)();
  268.  
  269. /*
  270.     The next function is called every time the cursor is drawn, return 1 if
  271.     you rendered the cursor yourself, 0 otherwise.
  272. */
  273.     long    (*vw_drawcurs)();
  274.  
  275. /*
  276.     The next function called when the user tries to insert a character on a
  277.     writeprotected line. Return 1 if it may be inserted, 0 otherwise.
  278. */
  279.     int    (*vw_checkprotection)();
  280.  
  281. /*
  282.     The next function is called when the user gives a Fold command.
  283.     If you want to support folding you should set your fold function here.
  284. */
  285.     void    (*vw_fold)();
  286.  
  287. /*
  288.     The next function is called when the user gives a UnFold command.
  289.     If you want to support folding you should set your unfold function here.
  290. */
  291.     void    (*vw_unfold)();
  292.  
  293. /*
  294.     The next function is called when the user gives a Fold TOGGLE command.
  295.     If you want to support folding you should set your fold toggle function
  296.     here.
  297. */
  298.     void    (*vw_togglefold)();
  299. /*
  300.     The next function is called when the user asks for the viewer
  301.     preferences.
  302. */
  303.     void    (*vw_preferences)();
  304.  
  305. /*
  306.     The next function is called instead of the display function when
  307.     initializing.
  308. */
  309.     long    (*vw_init)();
  310.  
  311. /*
  312.     The next option is the same as the vw_keyslist field, only this one is
  313.     used for smart-indent defenitions.
  314. */
  315.     struct List    *vw_indslist;
  316. };
  317.  
  318. /*
  319.     Versions of AMIS that can be given in the ln_type field of the viewer
  320.     structure.
  321. */
  322.  
  323. #define AMIS_0_97        0
  324. #define AMIS_0_98        1        /* also has a vw_clear field. */
  325. #define AMIS_0_99        2        /* also has vw_openscreen and vw_closescreen
  326.                                         fields. */
  327. #define AMIS_1_00        3        /* also has vw_drawcurs, vw_checkprotection,
  328.                                         vw_fold, vw_unfold and vw_togglefold fields.
  329.                                         */
  330. #define AMIS_1_01        4
  331. #define AMIS_1_02        5        /* also has a vw_init field */
  332. #define AMIS_1_03        6        /* also has a vw_indslist fields */
  333.  
  334. struct AMIS
  335. {
  336.     struct IntuitionBase    *AMIS_IntuitionBase;
  337.     struct GfxBase            *AMIS_GfxBase;
  338.     struct Library            *AMIS_GadToolsBase;
  339.     struct Library            *AMIS_DatatypesBase;
  340.     struct Library            *AMIS_DiskfontBase;
  341.     struct Screen            *AMIS_ScreenBase;
  342.     long                        *AMIS_VisualInfo;
  343.     struct DisplayInfo    *AMIS_DisplayInfo;
  344.     struct ColorMap        *AMIS_ColorMap;
  345.     char                        *AMIS_Flags;
  346.     struct Font                *AMIS_Normal_Font;        /* the default text font */
  347.     char                        *AMIS_PrintBuf;
  348.     struct Catalog            *AMIS_Catalog;
  349.     struct MsgPort            *AMIS_MsgPort;
  350.     struct Library            *AMIS_AMISLibBase;
  351.     struct DosLibrary        *AMIS_DOSBase;
  352.     char                        *AMIS_RunTimeFlags;
  353.     struct IClass            *AMIS_PaletteClass;
  354. };
  355.  
  356. #define EFLG_CHANGED        0
  357. #define EFLG_LCHANGED    1
  358. #define EFLG_CURS            2
  359. #define EFLG_CURSMODE    3
  360. #define EFLG_FLASHCURS    4
  361. #define EFLG_HIDE            5
  362. #define EFLG_PLUSSIGN    6
  363. #define EFLG_UNTITLED    7
  364.  
  365. #define EFLG2_MOUSE        0
  366. #define EFLG2_UP            1
  367. #define EFLG2_DOWN        2
  368. #define EFLG2_SELECTED    3
  369. #define EFLG2_SELSTART    4
  370. #define EFLG2_SELEND        5
  371. #define EFLG2_MOUSESEL    6
  372.  
  373. #define EFLG3_MOUSEUP    0
  374. #define EFLG3_MOUSEDOWN    1
  375. #define EFLG3_PROTECT    2
  376. #define EFLG3_MODECHNG    3
  377. #define EFLG3_ICONIFIED    4
  378. #define EFLG3_CODECURS    5
  379. #define EFLG3_NOUPDATE    6
  380. #define EFLG3_REVERT        7
  381.  
  382. #define EFLG4_RESIZED    0
  383. #define EFLG4_TOOLBAR    1
  384. #define EFLG4_VIEWERBAR    2
  385. #define EFLG4_STATUSBAR    3
  386. #define EFLG4_CODEBAR    4
  387. #define EFLG4_OVERWRITE    5
  388. #define EFLG4_LOCKED        6
  389. #define EFLG4_ARRANGING    7
  390.  
  391. #define EFLG5_WORDWRAP    0
  392. #define EFLG5_ANSIBOLD    1
  393. #define EFLG5_NEWFONT    2
  394. #define EFLG5_SMALLCURS    3
  395. #define EFLG5_NOGETWINP    4
  396. #define EFLG5_FASTMODE    5
  397. #define EFLG5_AUTOLINE    6
  398. #define EFLG5_VERTICAL    7
  399.  
  400. #define EFLG6_DRAGNDROP    0
  401. #define EFLG6_LINEPROT    1
  402.  
  403. /* Some settings flags */
  404.  
  405. #define BACKUP_FLAG1        0
  406. #define ICONS_FLAG1        1
  407. #define FLASH_FLAG1        2
  408. #define AUTOIND_FLAG1    3
  409. #define TOOLBAR_FLAG1    4
  410. #define VIEWERBAR_FLAG1    5
  411. #define STATUSBAR_FLAG1    6
  412. #define CODEBAR_FLAG1    7
  413.  
  414. #define CURSWRAP_FLAG2    0
  415. #define FASTMODE_FLAG2    1
  416. #define AUTOLINE_FLAG2    2
  417. #define ANSISHINE_FLAG2    3
  418. #define DRAGNDROP_FLAG2    4
  419. #define NUMERIC_FLAG2    5
  420.  
  421. /*global flags for all files */
  422.  
  423. #define QUIT_FLAG3        0
  424. #define VISIT_FLAG3        1
  425. #define ICONIFIED_FLAG3    2
  426. #define REDO_FLAG3        3
  427. #define JOINUNDO_FLAG3    4
  428. #define CUTBLOCK_FLAG3    5
  429. #define ENDICON_FLAG3    6
  430. #define REDRAW_FLAG3        7
  431.  
  432. #define CURSLINE_FLAG4    0
  433. #define CURSDONE_FLAG4    1
  434. #define CLOSEFONT_FLAG4    2
  435. #define PRIVATE_FLAG4    3
  436. #define ASKPRJ_FLAG4        4
  437. #define MACRO_FLAG4        5
  438. #define MACRO2_FLAG4        6
  439. #define DEFAULT_FLAG4    7
  440.  
  441. #define MACROKEY_FLAG5    0
  442. #define NOPRINT_FLAG5    1
  443. #define SETTINGS_FLAG5    2
  444. #define SETLBUF_FLAG5    3
  445. #define REDRAWING_FLAG5    4
  446. #define CANCEL_FLAG5        5
  447. #define NO_ANSWER_FLAG5    6
  448. #define INIT_FLAG5        7
  449.  
  450. #define BARLABEL_FLAG6    0
  451. #define SUBITEMS_FLAG6    1
  452. #define INIT_CHNG_FLAG6    2
  453. #define COLORS_FLAG6        3
  454. #define NEWPREFS_FLAG6    4
  455. #define MENU_CHNG_FLAG6    5
  456. #define ANSI_UPD_FLAG6    6
  457. #define DRAWDONE_FLAG6    7
  458.  
  459. #define NOSLIDER_FLAG7    0
  460. #define BOOTUP_FLAG7        1
  461. #define SRCPASTE_FLAG7    2
  462.  
  463. #define VFLG1_TOTAL_Y    0
  464. #define VFLG1_TEMP        1        /* Use a temporary rastport (this prevent
  465.                                             blinking graphics, it works the same as a
  466.                                             double buffered screen). */
  467. #define VFLG1_INIT        2        /* Use initializing routine for this viewer */
  468. #define VFLG1_CHAR_STAT    3        /* Use ed_char instead of ed_winpos in
  469.                                             statusbar */
  470. #define VFLG1_PROP        4        /* No fixed with font. */
  471. #define VFLG1_PRINTINIT    5        /* use the display function for initializing.
  472.                                             (or vw_init if available) */
  473.  
  474. #define VFLG2_ST_CASE    0
  475. #define VFLG2_PRIVATE2    6
  476. #define VFLG2_PRIVATE    7
  477.  
  478. #define LINEDATA            12
  479.  
  480.  
  481. #pragma libcall ViewerLib InternalCommand            6    801
  482. #pragma libcall ViewerLib InternalCommand__FPc    6    801
  483. #pragma libcall ViewerLib CursLeft                    c    0
  484. #pragma libcall ViewerLib CursRight                    12    0
  485. #pragma libcall ViewerLib GetWinPos                    18    0
  486. #pragma libcall ViewerLib GetImage                    1e    901
  487. #pragma libcall ViewerLib LoadImage                    24    0
  488. #pragma libcall ViewerLib SetViewervar                2a    0
  489. #pragma libcall ViewerLib SetViewervar2            30    0
  490. #pragma libcall ViewerLib WordWrapSaveFilter        36    0
  491. #pragma libcall ViewerLib CursUp                        3c    0
  492. #pragma libcall ViewerLib CursDown                    42    0
  493. #pragma libcall ViewerLib CursSOL                    48    0
  494. #pragma libcall ViewerLib DoReturn                    4e    0
  495. #pragma libcall ViewerLib NewViewerbar                54    0
  496. #pragma libcall ViewerLib BuiltRequester            5a    9802
  497. #pragma libcall ViewerLib BuiltRequester__FP11AMIS_ReqDefP7TagItem 5a 9802
  498. #pragma libcall ViewerLib ShowRequester            60    801
  499. #pragma libcall ViewerLib ShowRequester__FP14AMIS_Requester 60 801
  500. #pragma libcall ViewerLib CloseRequester            66    801
  501. #pragma libcall ViewerLib CloseRequester__FP14AMIS_Requester 66 801
  502. #pragma libcall ViewerLib FreeRequester            6c    801
  503. #pragma libcall ViewerLib FreeRequester__FP14AMIS_Requester 6c 801
  504. #pragma libcall ViewerLib FileRequester            72    0
  505. #pragma libcall ViewerLib GetYPos                    78    0
  506. #pragma libcall ViewerLib AddLineNode                7e    0
  507. #pragma libcall ViewerLib GetLineNode                84    0
  508. #pragma libcall ViewerLib ClearList                    8a 801
  509. #pragma libcall ViewerLib GetChar                    90 0
  510. #pragma libcall ViewerLib ImageSize                    96 801
  511. #pragma libcall ViewerLib ImageBitMap                9c 001
  512. #pragma libcall ViewerLib StoreCursorPosition    a2 0
  513. #pragma libcall ViewerLib RecallCursorPosition    a8    0
  514. #pragma libcall ViewerLib SetLineBuf                ae    0
  515. #pragma libcall ViewerLib RedrawViewerWindows    b4    801
  516. #pragma libcall ViewerLib RedrawViewerWindows__FP6Viewer b4 801
  517.  
  518. ULONG GetListview(struct Gadget *listview,struct Window *window);
  519.  
  520. char *InternalCommand(char *command);
  521.  
  522. ULONG CursLeft(void);
  523. ULONG CursRight(void);
  524. ULONG CursUp(void);
  525. ULONG CursDown(void);
  526. ULONG CursSOL(void);
  527. ULONG CursEOL(void);
  528.  
  529. void GetWinPos(void);
  530.  
  531. ULONG DoReturn(void);
  532.  
  533. void SetViewervar(long var, char *text);
  534. void SetViewervar2(long var, char *text);
  535.  
  536. Object *GetImage(char *filename);
  537. Object *LoadImage(char *filename);
  538.  
  539. long ImageSize(Object *obj);
  540. struct BitMap *ImageBitMap(Object *obj);
  541.  
  542. void WordWrapSaveFilter(void);
  543.  
  544. void NewViewerBar(void);
  545.  
  546. __saveds __asm struct AMIS_Requester *BuiltRequester(
  547.                                         register __a0 struct AMIS_ReqDef *reqdef,
  548.                                         register __a1 struct TagItem *tags);
  549. void ShowRequester(struct AMIS_Requester *req);
  550. void CloseRequester(struct AMIS_Requester *req);
  551. void FreeRequester(struct AMIS_Requester *req);
  552.  
  553. struct AMIS_Requester *AMISBuiltRequester(struct AMIS_ReqDef *req, struct TagList *tags);
  554. void AMISShowRequester(struct AMIS_Requester *req);
  555. void AMISCloseRequester(struct AMIS_Requester *req);
  556. void AMISFreeRequester(struct AMIS_Requester *req);
  557. void AMISCheckMessage(struct IntuiMessage *msg);
  558.  
  559. long GetYPos(void);
  560.  
  561. struct Node *AddLineNode(long size, long line, long character);
  562. struct Node *GetLineNode(long line, long character);
  563.  
  564. void RedrawViewerWindows(struct Viewer *viewer);
  565.  
  566. struct AMIS_ReqDef {
  567.     short    x;
  568.     short    y;
  569.     short    width;
  570.     short    height;
  571.     short    zoomleft;
  572.     short    zoomtop;
  573.     short    zoomed;
  574.     char    *title;
  575. };
  576.  
  577. #define AM_Screen                TAG_USER
  578. #define AM_Locale                TAG_USER+1
  579.  
  580. #define AM_Gadgets            TAG_USER+2
  581.  
  582. #define AM_Button                TAG_USER+3
  583. #define AM_CheckMark            TAG_USER+4
  584. #define AM_Cycle                TAG_USER+5
  585. #define AM_Listview            TAG_USER+6
  586. #define AM_Slider                TAG_USER+7
  587. #define AM_Integer            TAG_USER+8
  588. #define AM_GNumber            TAG_USER+9
  589. #define AM_String                TAG_USER+10
  590. #define AM_GText                TAG_USER+11
  591. #define AM_IText                TAG_USER+12
  592. #define AM_BackLine            TAG_USER+13
  593. #define AM_BackBox            TAG_USER+14
  594. #define AM_UserGadget        TAG_USER+15
  595.  
  596. #define AM_SameWidth            TAG_USER+16
  597. #define AM_SameLeft            TAG_USER+17
  598. #define AM_Code                TAG_USER+18
  599.  
  600. #define AM_MessagePort        TAG_USER+19
  601.  
  602. #define AM_EscFunction        TAG_USER+20
  603. #define AM_ReturnButton        TAG_USER+21
  604. #define AM_CloseFunction    TAG_USER+22
  605.  
  606. #define AM_MaxFontHeight    TAG_USER+23
  607.  
  608. #define AM_UpdateNumbers    TAG_USER+24
  609. #define AM_UpdateTexts        TAG_USER+25
  610.  
  611. #define AM_LocaleOffset        TAG_USER+26
  612.  
  613. #define AM_Project            TAG_USER+27
  614.  
  615. struct AMIS_Button {
  616.     short    left;
  617.     short    top;
  618.     short width;
  619.     short height;
  620.     char    *name;
  621.     struct Gadget    *gadget;
  622.     char    type;
  623.     char    locale;
  624.     void    (*handler)();
  625. };
  626.  
  627. struct AMIS_String {
  628.     short    left;
  629.     short    top;
  630.     short width;
  631.     short height;
  632.     char    *name;
  633.     struct Gadget    *gadget;
  634.     char    type;
  635.     char    locale;
  636.     char    *buffer;
  637.     short    chars;
  638.     void    (*handler)();
  639. };
  640.  
  641. struct AMIS_GText {
  642.     short    left;
  643.     short    top;
  644.     short width;
  645.     short height;
  646.     char    *name;
  647.     struct Gadget    *gadget;
  648.     char    type;
  649.     char    locale;
  650.     char    *text;
  651.     void    (*handler)();
  652. };
  653.  
  654. struct AMIS_GNumber {
  655.     short    left;
  656.     short    top;
  657.     short width;
  658.     short height;
  659.     char    *name;
  660.     struct Gadget    *gadget;
  661.     char    type;
  662.     char    locale;
  663.     long    number;
  664. };
  665.  
  666. struct AMIS_Integer {
  667.     short    left;
  668.     short    top;
  669.     short width;
  670.     short height;
  671.     char    *name;
  672.     struct Gadget    *gadget;
  673.     char    type;
  674.     char    locale;
  675.     void  (*handler)(void);
  676.     short    *variable;
  677.     short    undo;
  678.     long    digits;
  679.     short    min;
  680.     short    max;
  681. };
  682.  
  683. struct AMIS_CheckMark {
  684.     short    left;
  685.     short    top;
  686.     short width;
  687.     short height;
  688.     char    *name;
  689.     struct Gadget    *gadget;
  690.     char    type;
  691.     char    locale;
  692.     char    *variable;
  693.     char    undo;
  694.     char    mask;
  695.     void    (*handler)();
  696. };
  697.  
  698. struct AMIS_Cycle {
  699.     short    left;
  700.     short    top;
  701.     short width;
  702.     short height;
  703.     char    *name;
  704.     struct Gadget    *gadget;
  705.     char    type;
  706.     char    locale;
  707.     short    *variable;
  708.     short    undo;
  709.     short    max;
  710.     char    *namelist;
  711.     char    *valuelist;
  712.     char    *locales;
  713.     void    (*handler)();
  714. };
  715.  
  716. struct AMIS_Listview {
  717.     short    left;
  718.     short    top;
  719.     short width;
  720.     short height;
  721.     char    *name;
  722.     struct Gadget    *gadget;
  723.     char    type;
  724.     char    locale;
  725.     struct List    *list;
  726.     short    readonly;
  727.     short    spacing;
  728.     void    (*handler)();
  729.     void    (*double_click)();
  730.     void    (*hook)();
  731.     struct Gadget    *string;
  732. };
  733.  
  734. struct AMIS_Backbox {
  735.     short    left;
  736.     short    top;
  737.     short width;
  738.     short height;
  739.     char    *name;
  740.     struct Gadget    *gadget;
  741. };
  742.  
  743. struct AMIS_Requester {
  744.     struct Window    *ar_window;
  745.     struct Screen     *ar_screen;
  746.     char                ar_type;
  747.     char                ar_flags;
  748.     void                *ar_vinfo;
  749.     struct MsgPort    *ar_msgport;
  750.     struct Gadget    *ar_gadgetlist;
  751.     struct Gadget  *ar_usergadgets;
  752.     struct Gadget    *ar_gadgets;
  753.     struct Gadget    *ar_gtexts;
  754.     struct Gadget    *ar_gnumbers;
  755.     struct AMIS_ReqDef    *ar_interstruct;
  756.     char                *ar_AMISLib_id;
  757.     void                (*ar_EscFunction)();
  758.     void                (*ar_ReturnButton)();
  759.     void                (*ar_CloseFunction)();
  760.     struct TextAttr    *ar_font;
  761.     struct Gadget    *ar_lastgadget;
  762.     long                ar_reserved2;
  763.     long                ar_reserved3;
  764.     struct Catalog    *ar_locale;
  765.     long                ar_localeoffset;
  766.     short                ar_reserved4;
  767.     short                ar_fontheight;
  768.     short                ar_topborder;
  769.     struct Gadget    *ar_patterngadget;
  770.     void                *ar_patternobject;
  771.     struct Gadget    *ar_backboxes;
  772.     long                ar_lastnormal;
  773.     long                ar_userdata;
  774.     void                *ar_temptags;
  775.     short                ar_left;
  776.     short                ar_top;
  777.     short                ar_width;
  778.     short                ar_height;
  779.     short                ar_zoomleft;
  780.     short                ar_zoomtop;
  781.     short                ar_zoomed;
  782.     char                *ar_title;
  783.     short                ar_groupwidth;
  784.     short                ar_groupleft;
  785.     struct List        ar_objectlist;
  786.     struct TagItem    *ar_taglist;
  787.     struct Node        ar_projectnode;
  788. };
  789.  
  790. #define PALGA_Color            TAG_USER
  791. #define PALGA_Colors            TAG_USER+1
  792. #define PALGA_ColorTable    TAG_USER+2
  793. #define PALGA_Redraw            TAG_USER+3
  794.  
  795. #define AM_RELWIDTH        0x8000
  796. #define AM_RELRIGHT        0x8000
  797. #define AM_RELLASTRIGHT    0x1000
  798. #define AM_TEXTLENGTH    0x4000
  799. #define AM_SHAREDWIDTH    0x2000
  800. #define AM_SHAREDLEFT    0x2000
  801.